<?php
if (!defined('IN_CONTEXT')) die('access violation error!');
?>
<script type="text/javascript" language="javascript">
<!--
function update_checkitem_info(thisForm)
{
	$("#stat").css({"display":"block"});
	$("#stat").html("正在保存内容......");
	_ajax_submit(thisForm, on_success, on_failure);
	return false;
}

function on_success(response)
{
	response1 = eval("("+response+")");
	var stat = document.getElementById("stat");
	if(response1.result == 'ok')
	{
		alert(response1.sucmsg);
		stat.innerHTML = "OK，正在重定向......";
		reloadPage();
	}
	else if(response1.result == 'error')
	{
		stat.innerHTML = response1.errmsg;
	}
}

function on_failure(response)
{
	var stat = document.getElementById("stat");
	stat.innerHTML = response;
}
-->
</script>
<style type='text/css'>
table {
	margin-top:20px;
}
table td {
	text-align:left;
}
</style>
<div id="stat" style="display:none;"></div>
<form action="index.php" method="post" onsubmit="javascript:return update_checkitem_info(this);">
<input type="hidden" name="_m" value="<?php echo $next_controller;?>"/>
<input type="hidden" name="_a" value="<?php echo $next_action;?>"/>
<input type="hidden" name="c_id" value="<?php echo $_GET['c_id'];?>"/>
<table width="100%" border="0" cellpadding="2" cellspacing="0" bordercolor="#4c4c4c">
<tr>
<td>*检测项类别</td>
<td>
<select name="c_type">
<?php 
foreach($types as $v)
{
	if($v['ct_id'] == $items['c_type_id'])
	{
		echo "<option selected='selected' value='{$v['ct_id']}'>{$v['ct_name']}</option>";
	}
	else
	{
		echo "<option value='{$v['ct_id']}'>{$v['ct_name']}</option>";
	}
}
?>
</select>
</td>
</tr>
<tr>
<td>*检测项描述</td>
<td><textarea name="c_desc" cols="50" rows="20"><?php echo $items['c_desc'];?></textarea></td>
</tr>
<tr>
</tr>
</table>
<input type="submit" value="修改"/>
<input type="reset" value="重置"/>
</form>